#include <head.h>


char buf[128];
int main(int argc, char const *argv[])
{
    int fd = open("my_fifo",O_RDONLY);
    OPEN_ERR(fd);
    printf("读端\n");
    while (1)
    {
        memset(buf,0,sizeof(buf));
        read(fd,buf,sizeof(buf));
        if (!strcmp(buf,"quit"))
        {
            break;
        }
        printf("%s\n",buf);
    }
    
    return 0;
}
